<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>添加项目分类</title>
<link rel="stylesheet" href="<%=basePath%>admin/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=basePath%>admin/css/dashboard.css" />
<script type="text/javascript" charset="utf-8"
	src="<%=basePath%>js/ueditor1_4_3-utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"
	src="<%=basePath%>js/ueditor1_4_3-utf8-jsp/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8"
	src="<%=basePath%>js/ueditor1_4_3-utf8-jsp/lang/zh-cn/zh-cn.js"></script>

<script>
   		window.UEDITOR_HOME_URL = "<%=basePath%>js/ueditor1_4_3-utf8-jsp/*";
	var ue = UE.getEditor('editor');
</script>
</head>
<body>
	<!--上部导航栏start-->
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">众筹管理平台</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">

				<ul class="nav navbar-nav navbar-right">
					<li><a href="<%=basePath%>/pages/index.action">首页</a></li>
					<li><a href="#">欢迎 ${admin.name }</a></li>
					<li><a href="#" title="修改个人资料和密码的页面">设置</a></li>
					<li><a href="#" title="退出登录">退出</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<!--上部导航栏end-->
	<div class="container-fluid">
		<div class="row">
			<!--左侧导航栏start-->
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<li><a href="<%=basePath%>/pages/index.action">首页</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="<%=basePath%>Projects/mav.action">所有项目*</a></li>
					<li><a href="<%=basePath%>Projects/projecReview.action">项目审核</a></li>
					<li><a href="<%=basePath%>Projects/trackingList.action">项目跟踪</a></li>
					<li><a href="<%=basePath%>Projects/productComments.action">项目评论</a></li>
					<li><a href="<%=basePath%>Projects/classity.action">项目分类*</a></li>
					<li><a href="<%=basePath%>Projects/recommend.action">项目推荐</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="<%=basePath%>pages/backReg.action">注册管理员</a></li>
					<!-- <li><a href="">用户资金</a></li>
					<li><a href="">用户日志</a></li> -->
					<!-- <li><a href="">实名审核</a></li> -->
				</ul>
				<ul class="nav nav-sidebar">
					<li class="active"><a href="<%=basePath%>news/list.action">新闻管理</a></li>
					<li><a href="<%=basePath%>Projects/questionall.action">问题管理</a></li>
					<li><a href="<%=basePath%>adminLogin/adminList.action">管理用户</a></li>
					<!-- <li><a href="">管理日志</a></li> -->
				</ul>
			</div>
			<!--左侧导航栏end-->
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<h1 class="page-header">添加新闻</h1>

				<div class="panel panel-default"></div>
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">添加新闻</div>
					</div>
					<div class="panel-body">

						<div class="table-responsive ">
							<!-- <form class="form-horizontal" id="upload" method="post"
								action="#" enctype="multipart/form-data">
								<div class="form-group" align="center">
									<div class="col-md-4 col-sm-4  col-xs-4 col-lg-4">
										<input type="file" class="form-control" name="file" id="file"><br>
										<input type="submit" value="上传视频">
										<button id="file3" onClick="file3()">上传视频</button>
									</div>
								</div>
							</form> -->
							<%-- <form action="<%=basePath%>news/addNews.action" method="post" enctype="multipart/form-data"> --%>
							<form action="<%=basePath%>uploadflv/upload.action"
								method="post" enctype="multipart/form-data">

								<div class="form-group" align="center">
									<div class="col-md-4 col-sm-4  col-xs-4 col-lg-4">
										<input type="file" class="form-control" name="file" id="file"><br>
										<!-- <input type="submit" value="上传视频"> -->
										<!-- <button id="file3" onClick="file3()">上传视频</button> -->
									</div>
								</div>

								<div class="form-group">
									<input type="text" class="form-control" name="title"
										id="type_name" placeholder="新闻标题">
								</div>
								<div class="form-group">
									<input type="text" class="form-control" name="author"
										id="type_name" placeholder="新闻作者">
								</div>

								<div class="form-group">
									<!-- <input type="text" class="form-control" name="content"
										id="type_name" placeholder="新闻内容"> -->
									<textarea id="container" name="content"
										style="width: 1473.83px; height: 100px; margin: 0 auto;">新闻内容
									</textarea>
								</div>
								<div class="form-group">
									<input type="text" class="form-control" name="keyWords"
										id="type_name" placeholder="新闻关键字">
								</div>
								<div class="form-group">
									<input type="text" class="form-control" name="picture"
										id="type_name" placeholder="图片">
								</div>
								<div class="form-group">
									<!-- <input type="text" class="form-control" name="newsId"
										id="type_name" placeholder="是否推荐"> -->
									<select class="form-control m-bot15" name="newsId" id="newsId">

										<option value="0">不推荐</option>
										<option value="1">推荐</option>
									</select>
								</div>

								&nbsp;&nbsp;
								<button type="submit"
									class="btn btn-default btn-primary pull-right">添加</button>
							</form>
							<script type="text/javascript">
								var ue = UE.getEditor("container");
							</script>
						</div>
					</div>
				</div>

			</div>
		</div>
	</div>
	<script type="text/javascript"
		src="<%=basePath%>admin/js/jquery1.12.4.min.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>admin/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>admin/js/countUp.js"></script>
	<script>
		$(document).ready(function() {

		});
		/* var form = new FormData(document.getElementById("upload")); */
		 function file3(){
				
				$.ajax({
					url : "<%=basePath%>
		uploadflv/upload.action",
				method : "post",
				dataType : "json",
				data : $("#upload").serialize(),
				/* data : form,
				processData : false,
				contentType : false, */
				success : function(data) {
					alert("++++" + data.message);
				},
				error : function() {
					alert("上传视频失败!!!");
				}
			})
		}
	</script>
</body>
</html>